package com.lagou.edu.demo;

import com.lagou.edu.pojo.User;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class IHelloServiceImpl extends UnicastRemoteObject implements IHelloService {

    // 手动实现父类的构造方法
    public IHelloServiceImpl() throws RemoteException {
    }

    // 1.定义一个sayHello方法
    public String sayHello(User user) throws RemoteException {
        System.out.println("this is server, say hello to " + user.getUsername());
        return "success";
    }
}
